﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
    var keyValue = $.request("keyValue");
    $(function () {
        //initControl();
        if (!!keyValue) {
            $.ajax({
                url: "/SystemManage/Propertymapping/GetFormJson",
                data: { keyValue: keyValue },
                dataType: "json",
                async: false,
                success: function (data) {
                    $("#form1").formSerialize(data);
                }
            });
        }
    })
    //function initControl() {
    //    $("#parentId").bindSelect({
    //        url: "/SystemManage/Propertymapping/getParentList",
    //    });
    //}

    function submitForm() {
        if (!$('#form1').formValid()) {
            return false;
        }
        //var postData = $("#form1").formSerialize();
        $.submitForm({
            url: "/SystemManage/Propertymapping/SubmitForm?keyValue=" + keyValue,
            param: $("#form1").formSerialize(),
            success: function () {
                $.currentWindow().$("#gridList").trigger("reloadGrid");
             
            }
        })
    }
</script>
<form id="form1">
    <div style="margin-top: 10px; margin-left: 10px; margin-right: 10px;">
        <ul class="nav nav-tabs">
            <li class="active"><a href="#">基本信息</a></li>
        </ul>
        <div style="padding-top: 20px; margin-right: 30px;">
            <table class="form">
                <tr>
                    <th class="formTitle">属性名称<span style="color:red;">*</span></th>
                    <td class="formValue">
                        <input id="propertyName" name="propertyName" type="text" class="form-control required" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">属性值</th>
                    <td class="formValue">
                        <input id="propertyValue" name="propertyValue" type="text" class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">属性含义</th>
                    <td class="formValue">
                        <input id="propertyMeaning" name="propertyMeaning" type="text" class="form-control" />
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">标记</th>
                    <td class="formValue">
                        <input id="remark" name="remark" type="text" class="form-control" />
                    </td>
                </tr>
                @*<tr>
                    <th class="formTitle">父节点</th>
                    <td class="formValue">
                      <select id="parentId" name="parentId" class="form-control"></select>
                    </td>
                </tr>*@
            </table>
        </div>
    </div>
</form>
